public class num404 {
    //左叶子之和
    public int sumOfLeftLeaves(TreeNode root) {
        if(root == null){
            return 0;
        }
        return sumOfLeftLeaves(root.left) + sumOfLeftLeaves(root.right) +(root.left != null && root.left.left == null && root.left.right == null ? root.left.val : 0);
    }
}
